{
    "version": "2.0.0",
    "tasks": [
        {
            "label": "Build wsl",
            "type": "shell",
            "command": "wsl make grind", 

            "presentation": {
                "reveal": "always",
                "panel": "new"
            },
            "problemMatcher": []
        },
        {
            "label": "delete class files",
            "type": "shell",
            "command": "del /S *.class",
            "presentation": {
                "echo": true,
                "reveal": "always",
                "focus": false,
                "panel": "shared",
                "showReuseMessage": true,
                "clear": true
            },
            "group": {
                "kind": "build",
                "isDefault": true
            },
            "windows": {
                "options": {
                    "shell": {
                        "executable": "cmd.exe",
                        "args": ["/d", "/c"]
                    }
                }
            }
        },
        {
            "label": "Run release file",
            "type": "shell",
            "windows": {
              "command": "powershell",
              "args": [
                "-NoProfile",
                "-Command",
                "& { $file = Get-ChildItem -Path .\\out -Filter *.smd -Recurse | Select-Object -First 1; if ($file) { Start-Process $file.FullName }}"
              ]
            },
            "problemMatcher": []
        },
        {
            "label": "Build and Run wsl",
            "dependsOn": ["Build wsl", "Run release file"],
            "type": "shell",
            "command": "echo Build and Run wsl task"
        },
        {
            "label": "Clear and Build wsl",
            "dependsOn": ["delete class files", "build wsl"],
            "type": "shell",
            "command": "echo Build and Run wsl task"
        },
        {
            "label": "Clear wsl",
            "type": "shell",
            "command": "wsl make clean", 

            "presentation": {
                "reveal": "always",
                "panel": "new"
            },
            "problemMatcher": []
        }, 
    ]
}
